package bishi.saijing;

import java.util.Scanner;

/**
 * @author: Tangxz
 * @email: 1171702529@qq.com
 * @cate: 2022/03/27 10:59
 */
public class _E {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int k = sc.nextInt();
        int n = sc.nextInt();
        int up = 5;
        for (int i = 0; i < n; i++) {
            int uu = k / 10;
            k += uu > 5 ? 5 : uu;
            k += up;
        }
        System.out.println(k);
    }
}
